CC = gcc
CFLAGS += -c -Wall -g

all: main

main: main.o linkedlist.o
	$(CC) $^ -o $@

main.o: main.c
	$(CC) $^ $(CFLAGS) -o $@

linkedlist.o: linkedlist.c
	$(CC) $^ $(CFLAGS) -o $@

clean:
	$(RM) -r *.o main